//
//  ViewController.m
//  ImageView
//
//  Created by Apple on 1/25/16.
//  Copyright © 2016 Apple. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(photoClick:)];
    [_imageView addGestureRecognizer:singleTap];
    _imageView.userInteractionEnabled=YES;
}
-(void)photoClick:(id)sender{
    [UIView animateWithDuration:0.4f animations:^{
        self.view.backgroundColor=[UIColor blackColor];
        _imageView.frame=CGRectMake(0, [UIScreen mainScreen].bounds.size.height/2.0-100, [UIScreen mainScreen].bounds.size.width,200);
    } completion:^(BOOL finished) {
        //_imageView.frame=CGRectMake(0, [UIScreen mainScreen].bounds.size.height/2.0-100, [UIScreen mainScreen].bounds.size.width,200);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
